package thu.cs.segroup.entity;

import java.io.Serializable;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;

public class TestTask implements Serializable {

	private String name;
	private String wsdlURL;
	private String methodName;
	private String inputTypes;
	private String outputTypes;
	private int threadCount;
	private String category;
	/* 
	 * add property support,
	 * you can add any new properties into test case as you want
	 */
	private Properties props;

	public TestTask() {
		super();
		props = new Properties();
	}

	public TestTask(String name, String wsdlURL, String methodName,
			String inputTypes, String outputTypes, String category) {
		super();
		props = new Properties();
		this.name = name;
		this.wsdlURL = wsdlURL;
		this.methodName = methodName;
		this.inputTypes = inputTypes;
		this.outputTypes = outputTypes;
		this.category = category;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	public String getWsdlURL() {
		return wsdlURL;
	}
	
	public void setWsdlURL(String wsdlURL) {
		this.wsdlURL = wsdlURL;
	}
	
	public String getMethodName() {
		return methodName;
	}
	
	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}
	
	public String getInputTypes() {
		return inputTypes;
	}
	
	public void setInputTypes(String inputTypes) {
		this.inputTypes = inputTypes;
	}
	
	public String getOutputTypes() {
		return outputTypes;
	}
	
	public void setOutputTypes(String outputTypes) {
		this.outputTypes = outputTypes;
	}

	public int getThreadCount() {
		return threadCount;
	}

	public void setThreadCount(int threadCount) {
		this.threadCount = threadCount;
	}

	public void addProperty(String key, Object value) {
		props.put(key, value);
	}
	
	public Object getProperty(String key) {
		return props.get(key);
	}

	public void addAllProp(Map<String, Object> _props) {
		Iterator<String> iter = _props.keySet().iterator();
		while (iter.hasNext()) {
			String key = iter.next();
			this.props.put(key, _props.get(key));
		}
	}
	
	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}
		
}
